unconfirmed_user = ['brain','alice', 'brain','brain', 'cat''brain','brain',]
confirmed_user = []

#用while来删除元素
while 'brain' in unconfirmed_user :
    unconfirmed_user.remove('brain')


#用while来处理列表和字典
while unconfirmed_user :
    current_user = unconfirmed_user.pop()

    print("Verifying user: " + current_user.title())
    confirmed_user.append(current_user)

print("\nThe following users have been confirmed:")
for user in confirmed_user :
    print(user.title())



love_sings = {}

#创建一个标志
active_1 = True

while active_1 :
    name = input("请输入您的名字：")
    sings = input("你最喜欢的歌是哪首？")
    love_sings[name] = sings

    repeat = input("还有人愿意参与调查吗？(yes/no)")
    if repeat == 'no' :
        active_1 = False

print("\n----调查结束----")
for name , sings in love_sings.items() :
    print(name + " would like to listen the" + sings + '.')